//
//  GizManage.h
//  steamRoom
//
//  Created by 安建伟 on 2019/7/3.
//  Copyright © 2019 com.thingcom. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

// 数据点标识符
#define Data__Attr_SystemPower @"SystemPower"
#define Data__Attr_SystemFan @"SystemFan"
#define Data__Attr_ErrorImfor @"ErrorImfor"
#define Data__Attr_RoomTemp @"RoomTemp"
#define Data__Attr_SaunaRunTime @"SaunaRunTime"
#define Data__Attr_SystemLight @"SystemLight"
#define Data__Attr_SaunaStateTimeTemp @"SaunaStateTimeTemp"
#define Data__Attr_FMBT_StateFreqVol @"FMBT_StateFreqVol"
#define Data__Attr_FMBT_16_Freq @"FMBT_16_Freq"

// 标识各个数据点的枚举值
typedef enum
{
    Device_SystemPower,
    Device_SystemFan,
    Device_ErrorImfor,
    Device_RoomTemp,
    Device_SaunaRunTime,
    Device_OneLight,
    Device_TwoLight,
    Device_SaunaStateTimeTemp,
    Device_FMBT_StateFreqVol,
    Device_FMBT_16_Freq,
}DeviceDataPoint;

@interface GizManage : NSObject <GizWifiDeviceDelegate>

///单例模式
+ (instancetype)shareInstance;

///@brief 获取当前Wi-Fi的ssid
+ (NSString *)getCurrentWifi;

///@brief 机智云登录信息
@property (nonatomic, strong) NSString *uid;
@property (nonatomic, strong) NSString *token;
@property (nonatomic, strong) GizWifiDevice *device;
@property (nonatomic, strong) NSString *did;
@property (nonatomic, strong) NSString *userPhone;

///@brief 配网wifi ssid key
@property (nonatomic, strong) NSString *ssid;
@property (nonatomic, strong) NSString *key;

// 以下是存储各个数据点值的属性
@property (nonatomic, assign) BOOL key_SystemPower;
@property (nonatomic, assign) BOOL key_SystemFan;
@property (nonatomic, assign) NSInteger key_ErrorImfor;
@property (nonatomic, assign) NSInteger key_RoomTemp;
@property (nonatomic, assign) NSInteger key_SaunaRunTime;
@property (nonatomic, copy) NSString *key_OneLight;
@property (nonatomic, copy) NSString *key_TwoLight;
@property (nonatomic, copy) NSString *key_SaunaStateTimeTemp;
@property (nonatomic, copy) NSString *key_FMBT_StateFreqVol;
@property (nonatomic, copy) NSString *key_FMBT_16_Freq;

- (void)setGizDevice:(GizWifiDevice *)device;
- (DeviceDataPoint)judgeDeviceNameWith:(NSString *)deviceName;
/**
 *  初始化设备  ，即将设备的值都设为默认值
 */
- (void)initDevice;

/**
 *  写数据点的值到设备
 *
 *  @param dataPoint 标识数据点的枚举值
 *  @param value     数据点值
 */
- (void)writeDataPoint:(DeviceDataPoint)dataPoint value:(id)value;
/**
 *  从数据点集合中获取数据点的值
 *
 *  @param dataMap 数据点集合
 */
- (void)readDataPointsFromData:(NSDictionary *)attrStatus;

@end

NS_ASSUME_NONNULL_END
